package com.zara.store.client.clientmodel;


import com.zara.store.common.PalcItemViewVO;
import com.zara.store.common.ProductVO;
import com.zara.store.common.StoreProxy;

public class RetailBasketProduct implements BasketProduct {

	private static final long serialVersionUID = 1L;
	
	private ProductVO productVO;
	private PalcItemViewVO palcItemViewVO;
	
	public RetailBasketProduct(String barcode) {
		this.productVO = StoreProxy.getInstance().queryProduct(barcode);
	}
	
	public RetailBasketProduct(ProductVO productVO) {
		this.productVO = productVO;
	}
	
	public RetailBasketProduct(PalcItemViewVO palcItemViewVO) {
		this.palcItemViewVO = palcItemViewVO;
		this.productVO = palcItemViewVO.getProduct();
	}
	
	public boolean hasProduct() {
		return productVO != null;
	}
	
	public ProductVO getProductVO() {
		return productVO;
	}

	public PalcItemViewVO getPalcItemViewVO() {
		return palcItemViewVO;
	}

}
